home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 05 - 1989 / 05.09 Sep 89 / MPW C Sources / main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-04-16  |  806 b   |  30 lines  |  [TEXT/MPS ]

  1. #include <Errors.h>
  2.  
  3. int  number;
  4.  
  5. /* ============================================ */
  6. /* This is a very simple MPW C program, which   */
  7. /* illustrates how to set SADE breakpoints.     */
  8. /* -------------------------------------------- */
  9. /* Note that this program is designed to crash, */
  10. /* in order to force entry into the SADE        */
  11. /* debugger! (i.e. the SysError call).          */
  12. /* -------------------------------------------- */
  13. /* Joe Pillera, June 1989.                      */
  14. /* ============================================ */
  15.  
  16. main()
  17. {    
  18.   /* Set breakpoint #1 here (from SADE worksheet) */
  19.   number = 1;
  20.   
  21.   /* Now pass control to func, and let */
  22.   /* it alter the "number" variable.   */
  23.   func();
  24.  
  25.   /* Hard code breakpoint #3 here - just before we exit */
  26.   SysError(129); 
  27. }
  28.  
  29.  
  30.